import scrapy


class BookShelfSpider(scrapy.Spider):
    name = 'bookshelfspider'
    userId = '152100'
    originUrl = 'https://www.ciweimao.com/bookshelf/'
    start_urls = [originUrl + userId]
    booklist = []

    def parse(self, response):
        booklist = response.xpath('//ul[@class="J_ToggleBox book-list"]/li/div/a/@href').getall()
        for i in booklist:
            print(i)
